<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <link rel="stylesheet" href="ajax.css">
    <script src="ajaxtt.js" ></script>
</head>
<body>
    <p id="btn">我是一个集合了所有过时的能力者的8888888</p>
</body>
<script>

    var btn = document.getElementById('btn');
    btn.onclick=function () {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.onload=function () {
            document.write(xmlhttp.responseText);
        }

        xmlhttp.open('post','ajaxpathing','true');
        xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
        xmlhttp.send('name=lufei&age=33');
    }


</script>
</html>